A5WS_Get_Groups Function

Use of this function to retrieve security groups in newer applications is discouraged. Use Context.Security.GetRoles() instead.

Syntax

Group_List as C = a5ws_Get_Groups([* Localrequest [,L FlagWeb ]])

Arguments

LocalrequestPointer

The Request system variable. This variable explicitly passes all request variables to the function. Required if run from a web page.

FlagWebLogical

Default = .F.. If .T., groups are formatted for use in a list, checkbox, or radio control. If .F., groups returned as a CR-LF delimited list.

Returns

Group_ListCharacter

A list of security groups in the current web project.

Description

Show a CR-LF list of web groups for the current project. FlagWeb default value is .F. FlagWeb = .T. will output list in a format used in web components for checkboxes, radio buttons, list boxes and dropdowns. 'Request' pointer must be provided if run in web page.

Discussion

The A5WS_Get_Groups() function returns a list of security groups defined for the current web project. It can be used without parameters to return a list of groups defined for the current selected web project.

It can be used on a web page or in a web component event to retrieve a list of user security groups for use in a check box control, a dropdown list, a radio button list, or a listbox control in a legacy dialog component. Typically used in the Server Activate event of a legacy dialog component.

  1. Display the Form > Properties menu page of the legacy Dialog Builder.

  2. Click in the Server Events > Activate property.

Example

? A5WS_Get_Groups()
= Accounting
Administrators
Marketing

'on web page or in component event
grouplist = a5ws_get_groups(request,.T.)

Limitations

Web applications only.

See Also